package com.yxe.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxe.dto.SubletDto;
import com.yxe.dto.SubletVo;
import io.swagger.models.auth.In;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 转租接口
 */
@Repository
public interface SubletMapper {

    /**
     * 通过当前用户id查找对应的用户转租记录
     * @param uid
     * @return
     */

    List<SubletDto> findById(Integer uid);


    /**
     * 添加转租记录
     * @param subletVo
     */
    void addSublet(SubletVo subletVo);

    /**
     * 撤销转租申请
     * 需要先查出转租信息
     */
    SubletVo findSubletRecord(Integer uid);

    /**
     * 取消转租申请
     * @param uid
     */
    void deleteSubletRecord(Integer uid);
}
